package com.lyz.jingjie;

import java.util.Arrays;

/**
 * @ClassName MethodDemo
 * @Description 方法可变参数
 * @Author 2214361854
 * @Date 2022/2/22 19:30
 * @Version 1.0
 */
public class MethodDemo {
    public static void main(String[] args) {
        sum();
        sum(10);
        sum(10,22,33);
        sum(new int[]{1,2,3,5});
    }

    private static void sum(int ...nums) {
        System.out.println(Arrays.toString(nums));
    }

}
